package cn.z2huo.knowledge.basic.exception.finallyy;

import java.util.concurrent.TimeUnit;

/**
 * <p>
 *
 * @author z2huo
 */
class FinallyTerminateTest {

    public static void main(String[] args) {
        try {
            System.out.println("try");
            TimeUnit.SECONDS.sleep(5);
        } catch (InterruptedException e) {
            System.out.println("InterruptedException catch");
            throw new RuntimeException(e);
        } finally {
            // 可以执行到
            System.out.println("finally");
        }
    }

}
